﻿using System;
using ZHDJ.Core;
using ZHDJ.Data.DataCaching;

namespace ZHDJ.WebPage.Master
{
    public class UseMorePageMasterPage : PortalPage
    {
        #region 属性
        /// <summary>
        /// 模块(url传参)
        /// </summary>
        private string RequestModule
        {
            get
            {
                return this.Request["module"] ?? "";
            }
        }

        /// <summary>
        /// 页面类型(url传参)
        /// </summary>
        private string RequestCategory
        {
            get
            {
                return this.Request["category"] ?? "";
            }
        }

        private string RequestSearchText
        {
            get
            {
                return this.Request.QueryString["SearchText"] ?? "";
            }
        }

        /// <summary>
        /// 模块(自定义)
        /// </summary>
        public string Module
        {
            get; set;
        }

        /// <summary>
        /// 页面类型(自定义)
        /// </summary>
        public string Category
        {
            get; set;
        }

        /// <summary>
        /// 党员公示使用
        /// </summary>
        public string PublicityType
        {
            get;set;
        }

        public string SearchText {
            get;set;
        }


        #endregion

        protected override void OnPreLoad(EventArgs e)
        {
            base.OnPreLoad(e);
            var master = Master as MorePageMaster;
            if (master != null)
            {
                //优先加载Url传参
                Module = this.RequestModule;
                Category = this.RequestCategory;
                SearchText = this.RequestSearchText;
                InitModule();

                //加载自定义
                master.Module = Module;
                master.Category = Category;
               
            }
           
        }

        /// <summary>
        /// 在这里初始化模块值， 如果通过url传参可不设置
        /// </summary>
        protected virtual void InitModule()
        {
        }

      

    }
}
